package com.sky.mapper.admin;


import com.github.pagehelper.Page;
import com.sky.aop.anno.AutoFill;
import com.sky.dos.EmployeeDO;
import com.sky.dto.EmployeePageQueryDTO;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Employee;
import org.apache.ibatis.annotations.*;


public interface EmployeeMapper {

    void updateEmpById(Employee employee);

    EmployeeDO getEmpById(Long id);

    @AutoFill(OperationType.UPDATE)
    void updateStatusById(Employee employee);

    Page<EmployeeDO> SelectPageQuery(EmployeePageQueryDTO employeePageQueryDTO);

    @AutoFill(OperationType.INSERT)
    void insert(Employee employee);

    /**
     * 根据用户名查询员工
     * @param username
     * @return
     */
    @Select("select * from employee where username = #{username}")
    Employee getByUsername(String username);



}
